Carbon


MoveWindowStructure

Header: MacWindows.h Carbon status: Supported

Positions a window relative to its structure region.

OSStatus MoveWindowStructure (
    WindowRef window, 
    SInt16 hGlobal, 
    SInt16 vGlobal
);
window

A pointer to the window to be moved.

hGlobal

A value specifying the horizontal position, in global coordinates, to which the left edge of the window’s structure region is to be moved.

vGlobal

A value specifying the vertical position, in global coordinates, to which the top edge of the window’s structure region is to be moved.

function result

A result code.

DISCUSSION

The MoveWindowStructure function moves the specified window, but does not change the window’s size. When your application calls MoveWindowStructure, the positioning of the specified window is determined by the positioning of its structure region. This is in contrast to the MoveWindow function, where the positioning of the window’s content region determines the positioning of the window. After moving the window, MoveWindowStructure displays the window in its new position.

Note that your application should not call the MoveWindowStructure function to position a window when the user drags the window by its drag region. When the user drags the window, your application should call the pre–Mac OS 8.5 Window Manager function DragWindow.

VERSION NOTES

This function is available with Mac OS 8.5 and later.

AVAILABILITY

Supported in Carbon. Available in CarbonLib 1.0 and later when WindowsLib 8.5 or later is installed. Exported by CarbonLib 1.0 and later and by WindowsLib 8.5 and later.


© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)